<?include ($_SERVER ["DOCUMENT_ROOT"] . "/lib/module/conn_db.php");?>
<?include ($_SERVER ["DOCUMENT_ROOT"] . "/lib/module/Util.php");?>
<?php

	$page = $_GET ["page"];
	$artSid = $_GET ["art_sid"];

?>
<?php //DB Open

	$result = null;
	$db = new MyDB ( false );
	$db->err_report = true;

?>
<?php

	$util = new Util();

	$sid = $_GET['sid'];

	$sql = "SELECT article_contents1 from tb_board_article WHERE article_sid=".$artSid;
	$db->query ( $sql );
	$query = $db->result;
	$row = mysql_fetch_object($query);

	$sql = "SELECT * from tb_board_file WHERE article_sid=".$artSid;
	$db->query ( $sql );
	$query = $db->result;
	$total = mysql_num_rows ($query);

	$i=0;
?>
<?php //DB Close

	$db->close ();

?>
<?php if($total>0):
	while($file = mysql_fetch_object($query)):
		$files[] = $file;
	endwhile;
  endif;?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<? include "inc/inc_header.php" ?><!-- header -->
<!-- jQuery library -->
		<script type="text/javascript" src="libr/js/external/_oldies/jquery-1.3.min.js"></script>
		<!--<script type="text/javascript" src="libr/js/external/jquery-1.6.2.min.js"></script>-->

		<!-- jQuery Plugin scripts -->
		<script type="text/javascript" src="libr/js/external/jquery.easing.1.3.min.js"></script>
		<script type="text/javascript" src="libr/js/external/jquery.mousewheel.min.js"></script>

		<!-- Slider Kit scripts -->
		<script type="text/javascript" src="libr/js/sliderkit/jquery.sliderkit.1.9.2.pack.js"></script>
		<script type="text/javascript" src="libr/js/sliderkit/addons/sliderkit.delaycaptions.1.1.pack.js"></script>
		<script type="text/javascript" src="libr/js/sliderkit/addons/sliderkit.counter.1.0.pack.js"></script>
		<script type="text/javascript" src="libr/js/sliderkit/addons/sliderkit.timer.1.0.pack.js"></script>
		<script type="text/javascript" src="libr/js/sliderkit/addons/sliderkit.imagefx.1.0.pack.js"></script>

		<!-- Slider Kit launch -->
		<script type="text/javascript">
			$(window).load(function(){ //$(window).load() must be used instead of $(document).ready() because of Webkit compatibility

				// Photo gallery > Standard
				$("#standardPhotosgallery").sliderkit({
					mousewheel:true,
					shownavitems:7,
					//navfx:"none",
					panelbtnshover:true,
					auto:false,
					circular:true,
					navscrollatend:true,
					counter:true
				});

			});
		</script>

		<!-- Slider Kit styles -->
		<link rel="stylesheet" type="text/css" href="libr/css/sliderkit-core.css" media="screen, projection" />
		<link rel="stylesheet" type="text/css" href="libr/css/sliderkit-demos.css" media="screen, projection" />

		<!-- Slider Kit compatibility -->
		<!--[if IE 6]><link rel="stylesheet" type="text/css" href="libr/css/sliderkit-demos-ie6.css" /><![endif]-->
		<!--[if IE 7]><link rel="stylesheet" type="text/css" href="libr/css/sliderkit-demos-ie7.css" /><![endif]-->
		<!--[if IE 8]><link rel="stylesheet" type="text/css" href="libr/css/sliderkit-demos-ie8.css" /><![endif]-->

		<!-- Site styles -->
		<link rel="stylesheet" type="text/css" href="libr/css/sliderkit-site.css" media="screen, projection" />

<body style="background-repeat: repeat-x; overflow-x:hidden;background-color:transparent;"  oncontextmenu="return false" onselectstart="return false" ondragstart="return false">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
	<td style="padding-bottom:20px;"><table width="918" border="0" cellspacing="0" cellpadding="0">
		<tr>
		  <td height="114" valign="top" align="center"><!-- Start photosgallery-std -->
			<div id="standardPhotosgallery" class="sliderkit photosgallery-std">
				<div class="sliderkit-nav">
					<div class="sliderkit-btn sliderkit-nav-btn sliderkit-nav-prev"><a rel="nofollow" href="#" title="Previous line"><span>Previous line</span></a></div>
					<div class="sliderkit-btn sliderkit-nav-btn sliderkit-nav-next"><a rel="nofollow" href="#" title="Next line"><span>Next line</span></a></div>

					<div class="sliderkit-nav-clip">
						<ul>
						<?php if($total>0):?>
							<?php foreach($files as $val => $key):?>
								<li><a href="#" rel="nofollow" title="[link title]"><img src="uploads/3/<?php echo $key->file_name;?>" alt="[Alternative text]" width="81px" height="56px"/></a></li>
							<?php endforeach;?>
						  <?php endif;?>
						</ul>
					</div>
				</div>
				<div class="sliderkit-panels">
					<div class="sliderkit-btn sliderkit-go-btn sliderkit-go-prev"><a rel="nofollow" href="#" title="Previous"><span>Previous</span></a></div>
					<div class="sliderkit-btn sliderkit-go-btn sliderkit-go-next"><a rel="nofollow" href="#" title="Next"><span>Next</span></a></div>

					<div class="sliderkit-count sliderkit-count-items">
						<span class="sliderkit-count-current"></span><span class="sliderkit-count-sep">/</span><span class="sliderkit-count-total"></span>
					</div>
					<?php if($total>0):?>
						<?php foreach($files as $val => $key):?>
							<div class="sliderkit-panel">
								<img src="uploads/3/<?php echo $key->file_name;?>" alt="[Alternative text]" width="800px" />
							</div>
						<?php endforeach;?>
					  <?php endif;?>
				</div>
			</div>
			<!-- // end of photosgallery-std -->
		  </td>
		</tr>
	</table></td>
  </tr>
  <?
	$contents = $row->article_contents1;
	$contents = str_replace("font-family:한양신명조;","font-family:굴림;",$contents);
	$contents = str_replace("font-family:바탕;","font-family:굴림;",$contents);
	$contents = str_replace("font-size:14px","font-size:13px",$contents);
  ?>
  <tr>
	<td style="padding-bottom:20px; padding-left:60px;" align="left">
		<table width="800" border="0" cellspacing="0" cellpadding="0">
		<tr><td><?php echo $contents;?></td></tr>
		</table>
	</td>
  </tr>
  <tr>
	<td align="right"><a href="surn01_01_2.php?sid=<?php echo $sid;?>&art_sid=<?php echo $artSid;?>&page=<?php echo $page;?>"><img src="img/board/bt_list.gif" width="50" height="22" border="0"></a></td>
  </tr>
</table>
<? include "inc/inc_footer.php" ?><!-- footer -->
